# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1046.15.57 -> 1.1046.15.58 # include/linux/sched.h 1.142.1.2 -> 1.142.1.3 # drivers/char/mem.c 1.35.1.5 -> 1.35.1.6 # kernel/sched.c 1.180 -> 1.180.1.1 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1046.224.3 # [PCI]: Move pci_remove_bus_device back to include/linux/pci.h, discussed with greg@kroah.com # -------------------------------------------- # 03/06/04 neilb@cse.unsw.edu.au 1.1046.225.18 # [PATCH] Fix raid5 bug where wrong 'dev' is used. # -------------------------------------------- # 03/06/04 neilb@cse.unsw.edu.au 1.1046.225.19 # [PATCH] Fix raid1 handling of writing to multiple devices. # # When raid1 writes, it needs to schedule writes to some number # of devices, and when all writes have completed, the r1_bio # structure that holds it all together must be freed. # However we must make sure not to free it before all devices # have been considered for submitting writes to. # # This happens in two places: when submitting a normal write request # and when submiting a write as part of resync. # # This patch makes both these places: # the same # simpler # more correct. # -------------------------------------------- # 03/06/04 neilb@cse.unsw.edu.au 1.1046.225.20 # [PATCH] Fix up freeing of kmalloc structures # # Some paths free things twice, others free un-initialised values :-( # Not any more. # -------------------------------------------- # 03/06/04 neilb@cse.unsw.edu.au 1.1046.225.21 # [PATCH] Fix bug in /proc/mdstat # # If /proc/mdstat is large, or reads are for a small size, # then the last line of /proc/mdstat is repeated infinitely. # # This patch will fix it. # -------------------------------------------- # 03/06/04 zippel@linux-m68k.org 1.1046.225.22 # [PATCH] choice handling fixes # # A few choice handling fixes: # - only visible choice values define the new state of the complete choice # - improve handling of choices without visible value # - two new warnings # -------------------------------------------- # 03/06/04 shemminger@osdl.org 1.1046.224.4 # [NET]: Fix device unregister in TUN driver. # -------------------------------------------- # 03/06/04 davem@kernel.bkbits.net 1.1046.224.5 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/06/05 davem@nuts.ninka.net 1.1046.226.1 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/06/05 viro@parcelfarce.linux.theplanet.co.uk 1.1046.226.2 # [NET]: Convert USB drivers away from init_etherdev(). # -------------------------------------------- # 03/06/05 bde@nwlink.com 1.1046.225.23 # [SPARC64]: Fix transmit handling in sunsab.c serial driver. # -------------------------------------------- # 03/06/05 steve@gw.chygwyn.com 1.1046.226.3 # [AX25]: Sanitize ax25 netdevice private handling. # -------------------------------------------- # 03/06/05 bcollins@debian.org 1.1046.225.24 # [SPARC64]: Final image strip not to strip too much. # -------------------------------------------- # 03/06/05 elenstev@mesatop.com 1.1046.225.25 # [SPARC]: Fix non-ansi parameter lists. # -------------------------------------------- # 03/06/05 bcollins@debian.org 1.1046.227.1 # [PATCH] USB: fix keyboard leds # # > Ben, it looks like your patch broke something for USB keyboards, any # > idea? # # Yep, my patch killed hid-input from scanning HID_OUTPUT_REPORT's. Fixed # with this patch for 2.5.70+bk. I'll send one for 2.4.x in a few minutes. # -------------------------------------------- # 03/06/05 david-b@pacbell.net 1.1046.227.2 # [PATCH] USB: kerneldoc for gadget API # # Here's the non-inlined doc for the gadget API. # -------------------------------------------- # 03/06/05 oliver@neukum.org 1.1046.227.3 # [PATCH] USB: cut usb_set_config from hpusbscsi # # this cuts out old cruft. # -------------------------------------------- # 03/06/05 oliver@neukum.org 1.1046.227.4 # [PATCH] USB: usb_set_configuration in empeg.c # # you should not drop errors. # - proper error detection during initialisation # -------------------------------------------- # 03/06/05 torvalds@home.transmeta.com 1.1046.228.1 # Merge bk://are.twiddle.net/axp-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/05 axboe@suse.de 1.1046.228.2 # [PATCH] kill old stuff # # and fix the start/stop thing as well. I think this is all of them. # -------------------------------------------- # 03/06/05 torvalds@home.transmeta.com 1.1046.224.6 # Merge bk://kernel.bkbits.net/davem/net-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/05 davej@codemonkey.org.uk 1.1046.229.1 # [CPUFREQ] Make powernow-k7 leap big buildings^Wranges. # When scaling upwards, we need to change the voltage before the frequency. # When scaling downwards, the opposite. # This may fix some of the hangs people have been seeing when jumping # from a low frequency to a very high frequency. # -------------------------------------------- # 03/06/05 paulus@samba.org 1.1046.224.7 # [PATCH] get rid of CONFIG_ALL_PPC # # This patch gets rid of CONFIG_ALL_PPC, which was a very confusing # option, since it didn't actually mean "ALL" at all, it was more a # "common set" thing. # # The primary replacement for CONFIG_ALL_PPC is CONFIG_PPC_MULTIPLATFORM. # I have also defined CONFIG_PPC_PMAC, CONFIG_PPC_PREP and CONFIG_PPC_CHRP # for selecting code which is only needed for one of the three platforms # that CONFIG_ALL_PPC represented. This is something that we (the PPC # community) have been talking about doing for some time. There is also a # CONFIG_PPC_OF which is for PPC machines with Open Firmware, which is # currently powermacs and CHRP machines. # # At the moment, CONFIG_PPC_{PMAC,PREP,CHRP,OF} get unconditionally # defined if CONFIG_PPC_MULTIPLATFORM is selected, but in future this # split will let us have more control over what gets included, so that # for example we don't necessarily have to include powermac bits in a # kernel for a PReP machine. # # I have gone through the uses of CONFIG_ALL_PPC one by one and decided # which of the new symbols best represents the set of machines that need # the code in question. In fact most of the uses of CONFIG_ALL_PPC in # the drivers have been replaced by CONFIG_PPC_PMAC. The other symbols # are mostly confined to the PPC architecture code. # -------------------------------------------- # 03/06/05 mochel@osdl.org 1.1046.230.1 # [fs] Remove kobject support for filesystems # # It was initially added for the immediate gain of being able to see what # filesystems were registered in the system. However, it was done without # proper analysis of the lifetime rules associated with them. # # Someday, we should convert struct filesystem_type and struct super_block to # use kobjects, though it will take sufficent time and effort to get it right. # Until then, we go without.. # -------------------------------------------- # 03/06/05 davej@codemonkey.org.uk 1.1046.229.2 # [CPUFREQ] kill cpufreq_driver export. # From Dominik Brodowski. # This removes the special export of cpufreq_driver for proc_intf.c. Instead, # the behaviour of /proc/cpufreq previous of Greg's class re-write is back: # the check whether cpufreq_driver is loaded is done within cpufreq_cpu_get # -------------------------------------------- # 03/06/05 davej@codemonkey.org.uk 1.1046.229.3 # [CPUFREQ] Kill unused variables. # -------------------------------------------- # 03/06/05 mochel@osdl.org 1.1046.230.2 # [kobject] Remove kobj_lock and use lockless refcounting. # # The only thing preventing this from happening earlier was the circular sysfs # registration dependency - it would need to be initialized before it was # registered, but needed to be registered before it was initialized. # # With kobjects gone from struct filesystem_type, the dependency no longer # exists and we don't have to special-case the possibility that a kobject will # be passed to kobject_get with a refcount == 0. # # Note that a kobject with a count of 0 in that function is still a bug, but # one in the subsystem making the call. We should add a debugging hook to dump # the stack if it does happen. # -------------------------------------------- # 03/06/05 davej@codemonkey.org.uk 1.1046.229.4 # [CPUFREQ] CodingStyle fixes # -------------------------------------------- # 03/06/05 davej@codemonkey.org.uk 1.1046.229.5 # [CPUFREQ] Fix ACPI P-State driver. # from Dmitry Torokhov. # # I have the following problems with ACPI P-States driver: # # - It crashes because it tries to switch CPU speed without registering cpufreq # driver first but acpi_processor_set_performance calls cpufreq_notify_transition. # # - When testing for capable CPUs it skips all online ones so for my single CPU # notebook it can't activate at all. # # - If a processor does not support throttling then it will say that "limit" # interface is not supported even after activating performance control. # # The patch below should fix these issues. It also adds some info messages since # /proc/acpi/processor/*/performance interface is marked obsolete but i still # would like to see if P-states were recognized during boot. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.224.8 # [PATCH] PCI: remove direct access of pci_devices from arch/m68k/atari/hades-pci.c # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.224.9 # [PATCH] PCI: remove direct access of pci_devices from drivers/macintosh/via-pmu68k.c # # Yeah, this is commented out code, but just trying to be complete... # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.224.10 # [PATCH] PCI: fix up previous fusion driver pci changes # # This makes the driver build properly now, and removes a direct access # of the pci_devices variable. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.224.11 # [PATCH] PCI: add pci_find_device_reverse() for users of pci_find_each_dev_reverse() to use # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.224.12 # [PATCH] PCI: remove usage of pci_for_each_dev_reverse() in # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.224.13 # [PATCH] PCI: remove pci_for_each_dev_reverse() now that all users of it are gone. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.224.14 # [PATCH] PCI: move pci_present() into drivers/pci/search.c # # This will let not have to export the pci_devices variable. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.224.15 # [PATCH] PCI: remove EXPORT_SYMBOL(pci_devices) # # Now the only users of this directly should be the pci core and arch specific # pci core code. # -------------------------------------------- # 03/06/05 torvalds@home.transmeta.com 1.1046.231.1 # Merge bk://kernel.bkbits.net/davem/sparc-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/05 mhoffman@lightlink.com 1.1046.204.2 # [PATCH] I2C: more w83781d fixes # # This patch fixes the various return values in the w83781d_detect() # error paths. It also cleans up some formatting here and there. # It should be applied on top of the previous one. # # It works for me; same caveat as above w.r.t. ISA. # -------------------------------------------- # 03/06/05 aschultz@warp10.net 1.1046.204.3 # [PATCH] I2C: fix unsafe usage of list_for_each in i2c-core # # i2c-core.c contains 2 loops that iterate over the list of the clients attached # to an adapter and detaches them. Detaching the clients will actually remove # them from the list the loop is iterating over. Therefore the # list_for_each_safe() method has to be used. # -------------------------------------------- # 03/06/05 shemminger@osdl.org 1.1046.231.2 # [PATCH] typo in new class_device_release # # There is a typo in the current 2.5.70 bk version of class_device_release that # was not there in my original patch. By confusing the class and the class_device, # the release function oops. cd->release is always the function itself (class_device_release), # cls->release is the one setup for the class (net_class in my case). # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.204.4 # [PATCH] I2C: sync i2c-id.h with cvs version. # -------------------------------------------- # 03/06/05 Kurt.Robideau@comtrol.com 1.1046.232.1 # [PATCH] Rocketport driver against 2.5.70-bk7 # # Update the Rocketport driver # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.231.3 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/i2c-2.5 # -------------------------------------------- # 03/06/05 mochel@osdl.org 1.1046.230.3 # [driver model] Add device_for_each_child iterator. # # From Mike Anderson: # # I have been using it on an outstanding patch for scsi_set_host_offline. It # appears to work fine in my testing. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.233.1 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/tty-2.5 # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.234.1 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/gregkh-2.5 # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1046.224.16 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/pci-2.5 # -------------------------------------------- # 03/06/05 mochel@osdl.org 1.1046.230.4 # [kobject] Add warning + back trace if kobject_get() is called with 0 refcount. # -------------------------------------------- # 03/06/05 davidm@tiger.hpl.hp.com 1.1046.15.58 # More small cleanups to /dev/mem driver and for stack dumping. # -------------------------------------------- # diff -Nru a/drivers/char/mem.c b/drivers/char/mem.c --- a/drivers/char/mem.c Mon Sep 22 13:00:28 2003 +++ b/drivers/char/mem.c Mon Sep 22 13:00:28 2003 @@ -105,8 +105,8 @@ } -static ssize_t do_write_io(struct file * file, void *p, unsigned long realp, - const char * buf, size_t count, loff_t *ppos) +static ssize_t do_write_mmio(struct file * file, void *p, unsigned long realp, + const char * buf, size_t count, loff_t *ppos) { ssize_t written; char byte; @@ -209,7 +209,7 @@ if (uncached_access(file, (unsigned long) p)) { if (!(addr = ioremap(p, count))) return -EFAULT; - ret = do_write_io(file, addr, p, buf, count, ppos); + ret = do_write_mmio(file, addr, p, buf, count, ppos); iounmap(addr); } else ret = do_write_mem(file, __va(p), p, buf, count, ppos); diff -Nru a/include/linux/sched.h b/include/linux/sched.h --- a/include/linux/sched.h Mon Sep 22 13:00:28 2003 +++ b/include/linux/sched.h Mon Sep 22 13:00:28 2003 @@ -148,9 +148,14 @@ extern void init_idle(task_t *idle, int cpu); extern void show_state(void); -extern void show_trace(struct task_struct *, unsigned long *); -extern void show_stack(struct task_struct *, unsigned long *); extern void show_regs(struct pt_regs *); + +/* + * TASK is a pointer to the task whose backtrace we want to see (or NULL for current + * task), SP is the stack pointer of the first frame that should be shown in the back + * trace (or NULL if the entire call-chain of the task should be shown). + */ +extern void show_stack(struct task_struct *task, unsigned long *sp); void io_schedule(void); long io_schedule_timeout(long timeout); diff -Nru a/kernel/sched.c b/kernel/sched.c --- a/kernel/sched.c Mon Sep 22 13:00:28 2003 +++ b/kernel/sched.c Mon Sep 22 13:00:28 2003 @@ -2203,10 +2203,7 @@ else printk(" (NOTLB)\n"); - { - extern void show_trace_task(task_t *tsk); - show_trace_task(p); - } + show_stack(p, NULL); } void show_state(void)